// import mockGoods from "@/mock/example/goods.json";
import mockGoods from "@/mock/example/buy.json";
import { http } from "@/utlis/http";
export const getGoodsByIdAPI = () => {
  return Promise.resolve(mockGoods);
};
export const postSale = (data: any) => {
  return http({
    url: `/goods/list`,
    method: "POST",
    data,
  });
};

export const postGoodsAPI = (data: any) => {
  return http({
    url: `/goods/create`,
    method: "POST",
    data,
  });
};

export const getGoodsDatilAPI = (id: string) => {
  return http({
    method: "GET",
    url: "/goods",
    data: { id },
  });
};
